package net.wangds.dymodel.service;

import net.wangds.dymodel.comp.DyModelDefOpComp;
import net.wangds.dymodel.meta.entity.DyModelDefEntity;
import net.wangds.jpa.service.AbstractJpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.stereotype.Service;

/**
 * .
 * <p></p>
 *
 * @author 王东石 2020/11/10 16:02.
 */
@Service
public class DyModelDefOpService extends AbstractJpaService<DyModelDefEntity, DyModelDefOpComp> {

    @Autowired
    private DyModelDefOpComp mmCmpOp;

    @Override
    protected DyModelDefOpComp fetchJpaComp() {
        return mmCmpOp;
    }

    public Page<DyModelDefEntity> findByName(String nameEn, PageRequest paging) {
        return mmCmpOp.findByKeywords(nameEn, paging);
    }
}
